﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crosland.Automotriz.Entidad;
using System.Data.SqlClient;

namespace Crosland.Automotriz.Data.Dao.Linq
{
    public class clsMaterialDAO
    {
        private readonly DM_CROSLAND_20130417Entities ContextoDeObjs = new DM_CROSLAND_20130417Entities();

        public List<E_TD_MATERIAL> ListarMaterialxCodigo(string COD_MATERIAL)
        {
            var p = new object[] { new SqlParameter("@COD_MATERIAL", COD_MATERIAL) };
            var resultado = ContextoDeObjs.ExecuteStoreQuery<E_TD_MATERIAL>("exec USP_Material_Seleccionar_Codigo @COD_MATERIAL", p).AsQueryable().ToList();
            return resultado;
        }
    }
}
